<!-- 头部 start -->

<html xmlns:th="http://www.thymeleaf.org">
<header class="header" th:fragment="header">
    <style>
        .header {
            width: 100%
        }

        .header_top img {
            width: 100%;
            height: 100%
        }

        .shortcut {
            height: 30px;
            background: #f8f8f8;
            border-bottom: 1px solid #eee;
            font-size: 14px;
        }

        .shortcut .box {
            width: 1200px;
            margin: 0 auto;
            height: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 0;
        }

        .shortcut .box a {
            color: #404040;
            margin: 0 8px
        }

        .shortcut .box .right .glyphicon {
            color: #aaa;
            font-size: 14px;
        }

        .city {
            color: var(--primary-color);
            padding-top: 5px;
        }

        .header_wrap {
            padding: 10px 0;
        }

        .topbar {
            width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo {
            display: flex;
            align-items: center;
        }

        .logo img {
            margin-right: 15px
        }

        .logo a {
            display: inline-block;
        }

        .navitem {
            width: 100%;
            height: 40px;
            background: var(--primary-color);
        }

        .nav {
            width: 1200px;
            margin: 20px auto 0;
        }

        .nav li {
            float: left;
            margin-left: 30px;
        }

        .nav li a {
            color: #fff;
            font-size: 14px;
            display: inline-block;
        }

        .nav>li>a:focus,
        .nav>li>a:hover {
            background: none;
        }

        .nav .nav-active {
            background-color: #00000047;
        }

        .nav>li>a {
            padding: 10px 15px;
        }
    </style>
    <div class="shortcut">
        <div class="box">
            <div class="left">
                <div th:if="${session.users}==null">
                    <!-- 如果未登陆则显示登录/注册 -->
                    <a href="/frontdesk/login.html">登录</a> |
                    <a href="/frontdesk/register.html">注册</a>
                    <!-- 如果已经登陆则显示用户名 -->
                    <!-- <span>欢迎回来，admin</span> -->
                </div>
            </div>
            <!--			<a href="/frontdesk/project/projectList" class="collection">我的申请记录</a>-->
            <!-- 登录状态  -->
            <div class="right">
                <div th:if="${session.users}!=null">
                    <span th:text="'欢迎回来'+${session.users.username}"></span>
                    <a href="/frontdesk/project/projectList" class="collection">我的申请记录</a>
                    <a href="/frontdesk/users/logout">
                        退出
                        <span class="glyphicon glyphicon-log-out"></span>
                    </a>
                </div>
            </div>
        </div>


    </div>
    <div class="header_wrap">
        <div class="topbar">
            <div class="logo">
                <img src="/upload/img/news/logo.png" alt="">

                <div>
                    <div style="width:100px">
                        <span class="dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">
                            广州
                            <!-- <span class="caret"></span> -->
                        </span>
                    </div>
                    <p class="city">
                        <span class="glyphicon glyphicon-map-marker"></span> 当前城市
                    </p>
                </div>
            </div>
            <!--			<div class="search">-->
            <!--				<form action="/frontdesk/news/newsList">-->
            <!--					<input name="newsName" type="text" th:value="${newsName}" placeholder="" class="search_input"-->
            <!--						autocomplete="off">-->
            <!--					<button type="submit" class="search-button">搜索</button>-->
            <!--				</form>-->

            <!--			</div>-->
        </div>
    </div>
    <!-- 头部 end -->
    <!-- 首页导航 -->
    <div class="navitem">
        <ul class="nav">
            <li class="nav-active"><a href="/frontdesk/index.html">首页</a></li>
            <li><a th:href="@{/frontdesk/news/newsList}">新闻</a></li>
            <li><a th:href="@{/frontdesk/gramtoo/gramtooList}">成果</a></li>
            <li th:if="${session.users}!=null"><a href="/frontdesk/project_add.html">项目申请</a></li>
        </ul>
    </div>

    <script>
    </script>
</header>